import util.GuiImg;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class Get extends JPanel implements ActionListener {
    private Icon atmIcon8 = GuiImg.getIcon("/imgs/buttonSure.jpg");
    private JButton btnlogin8 = new JButton(atmIcon8);
    private Atm frame;

    public Get(Atm frame) {
        this.frame = frame;
        this.setLayout(null);
        //单行输入框
        JTextField textField1 = new JTextField();
        textField1.setBounds(250, 200, 250, 30);
        this.add(textField1);
        //确认按钮
        this.setOpaque(false);
        btnlogin8.setBounds(330, 300, 100, 40);
        this.add(btnlogin8);
        btnlogin8.addActionListener(this);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == btnlogin8){
            frame.switchPanel("菜单");
        }
    }
}
